/*
 * public class ShowBillboardTestBean
 * author: adam barney
 * This is test code. I'm not proud of the fact that it made it into the repo.
 */

/*
 * This file is part of WhatItDo.
 *
 * WhatItDo is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WhatItDo is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with WhatItDo.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.sourceforge.whatitdo.billboardWeb;

import java.util.ArrayList;

public class ShowBillboardTestBean {

    // ArrayList<String> slideshowText = new ArrayList<String>();

    public String getSlideshowTextAsString() {
	ArrayList<String> slideshowText = new ArrayList<String>();
	slideshowText.add("This is my rifle.");
	slideshowText.add("There are many like it, but this one is MINE.");
	slideshowText.add("My rifle is my best friend. It is my life.");
	slideshowText.add("I must master it as I must master my life.");

	String rtrn = new String();
	rtrn = ArrayListToString(slideshowText);
	System.out.println(rtrn);
	return rtrn;

    }

    private String ArrayListToString(ArrayList<String> aList) {

	StringBuilder sb = new StringBuilder();
	for (int i = 0; i < aList.size(); i++) {
	    if (i == (aList.size() - 1)) {
		sb.append("\"");
		sb.append(aList.get(i).toString());
		sb.append("\"");
	    } else {
		sb.append("\"");
		sb.append(aList.get(i).toString());
		sb.append("\", ");
	    }

	}
	String rtrn = sb.toString();
	return rtrn;

	
    }

}
